/*eslint-disable*/
import axios from "./config"

//定义很多请求的接口

//登入
export const loginApi = (username, password) => axios.post("/api/users/login",
    {
        username, password//post参数 直接传 get用params或者拼接
    }
)

//获取验证码
export const getCaptchaApi = () => axios.get("/api/users/getCaptcha")

//刷新验证码
export const refreshCaptchaApi = () => axios.get("/api/users/refreshCaptcha")

//校验验证码
export const verifyCaptchaApi = (captcha) => axios.get("/api/users/verifyCaptcha", {
    params: {
        captcha
    }
})

//生成二维码
export const getScancodeApi = () => axios.get("/api/users/getScancode")

//微信登录
export const wechatLoginApi = (wechatCode) => axios.get("/api/users/wechatLogin", {
    params: {
        wechatCode
    }
})

//getloginlog
//登入日志
export const getloginlogApi = (page = 1, count = 10) => axios.get("/api/getloginlog", {
    params: {
        page, count
    }
})

//获取权限菜单，用户登录之后
export const getMenuListApi = () => axios.get("/api/permission/getMenuList")

//折线图数据rate
export const rateApi = () => axios.get("/data/rate.json")


//环形图数据tarsk
export const lineApi = () => axios.get("/data/tarsk.json")


//饼图期望课程 expect
export const expectApi = () => axios.get("/data/expect.json")

//获取天气
export const getWeatherApi = () => axios.get("/api/weather/getWeather")


//获取学员信息
export const getstulistApi = (page = "", count = "", classes = "") => axios.get("/api/students/getstulist", {
    params: {
        page,
        count,
        class: classes
    }
})

//增加学员信息
export const addstuApi = (stuInfo) => axios.post("/api/students/addstu", stuInfo)

//编辑学员
export const editStuApi = (stuInfo) => axios.post("/api/students/updatestu", stuInfo)

//删除学员
export const delstuApi = (sId) => axios.get("/api/students/delstu", {
    params: {
        sId
    }
})

//获取班级列表
export const getclassesApi = () => axios.get("/api/students/getclasses")
